import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/newslist',
      name: 'newslist',
      component: () => import(/* webpackChunkName: "newslist" */ './views/news/NewsList.vue')
    },
    {
      path: '/newsdetail/:id',
      name: 'newsdetail',
      component: () => import(/* webpackChunkName: "newsdetail" */ './views/news/NewsDetail.vue')
    },
    {
      path: '/imgslist',
      name: 'imgslist',
      component: () => import(/* webpackChunkName: "imgslist" */ './views/imgs/ImgsList.vue')
    },
    {
      path: '/imgs-detail/:id',
      name: 'imgsdetail',
      component: () => import(/* webpackChunkName: "imgsdetail" */ './views/imgs/ImgsDetail.vue')
    },
    {
      path: '/commoditylist',
      name: 'commoditylist',
      component: () => import(/* webpackChunkName: "commoditylist" */ './views/commodity/commodityList.vue')
    },
    {
      path: '/dityDetail/:id',
      name: 'dityDetail',
      component: () => import(/* webpackChunkName: "dityDetail" */ './views/commodity/dityDetail.vue')
    },
    {
      path: '/ditycomment/:id',
      name: 'ditycomment',
      component: () => import(/* webpackChunkName: "ditycomment" */ './views/commodity/dityComment.vue')
    },
    {
      path: '/dityrecommend/:id',
      name: 'dityrecommend',
      component: () => import(/* webpackChunkName: "dityrecommend" */ './views/commodity/dityRecommend.vue')
    }
  ]
})
